package com.multycopy;

import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.LayoutStyle;

public class MCCopy extends JPanel {
	
	private static final long serialVersionUID = 1L;
	private JButton btnCancel;
    private JButton btnPause;
    private JLabel lblFileName;
    private JLabel lblStatus;
    private JProgressBar pbProgress;

    public MCCopy() {
    	
        this.setSize( 575, 98 );
        this.getLblFileName();
        this.getLblStatus();
        this.getBtnCancel();
        this.getBtnPause();
        this.getPbProgress();
        
        initComponents();
    }
    
    private JLabel getLblFileName() {
    	if( this.lblFileName == null ) {
    		this.lblFileName = new JLabel( "FileName" );
    	}
    	
    	return this.lblFileName;
    }
    
    private JLabel getLblStatus() {
    	if( this.lblStatus == null ) {
    		this.lblStatus = new JLabel( "Status" );
    	}
    	
    	return this.lblStatus;
    }
    
    private JButton getBtnCancel() {
    	if( this.btnCancel == null ) {
    		this.btnCancel = new JButton( "" );
    	}
    	
    	return this.btnCancel;
    }
    
    private JButton getBtnPause() {
    	if( this.btnPause == null ) {
    		this.btnPause = new JButton( "" );
    	}
    	
    	return this.btnPause;
    }
    
    private JProgressBar getPbProgress() {
    	if( this.pbProgress == null ) {
    		this.pbProgress = new JProgressBar();
    	}
    	
    	return this.pbProgress;
    }
    

    private void initComponents() {
        GroupLayout layout = new GroupLayout( this );
        this.setLayout( layout );
        
        layout.setHorizontalGroup(
            layout.createParallelGroup( GroupLayout.Alignment.LEADING )
            .addGroup( layout.createSequentialGroup()
                .addContainerGap()
                .addGroup( layout.createParallelGroup( GroupLayout.Alignment.LEADING )
                    .addComponent( this.lblFileName )
                    .addGroup( layout.createSequentialGroup()
                        .addComponent( this.pbProgress, GroupLayout.PREFERRED_SIZE, 499, GroupLayout.PREFERRED_SIZE )
                        .addPreferredGap( LayoutStyle.ComponentPlacement.RELATED )
                        .addComponent( this.btnPause, GroupLayout.PREFERRED_SIZE, 20, Short.MAX_VALUE )
                        .addPreferredGap( LayoutStyle.ComponentPlacement.RELATED )
                        .addComponent( this.btnCancel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE )
                        .addGap( 12, 12, 12 ) )
                    .addGroup( layout.createSequentialGroup()
                        .addComponent( this.lblStatus )
                        .addPreferredGap( LayoutStyle.ComponentPlacement.RELATED, 504, Short.MAX_VALUE ) ) )
                .addContainerGap() )
        );
        
        layout.setVerticalGroup(
            layout.createParallelGroup( GroupLayout.Alignment.LEADING )
            .addGroup( layout.createSequentialGroup()
                .addContainerGap()
                .addComponent( this.lblFileName )
                .addPreferredGap( LayoutStyle.ComponentPlacement.RELATED )
                .addGroup( layout.createParallelGroup( GroupLayout.Alignment.LEADING )
                    .addGroup( layout.createParallelGroup( GroupLayout.Alignment.BASELINE )
                        .addComponent( this.btnPause, 0, 0, Short.MAX_VALUE )
                        .addComponent( this.btnCancel, 0, 0, Short.MAX_VALUE ) )
                    .addComponent( this.pbProgress, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE ) )
                .addPreferredGap( LayoutStyle.ComponentPlacement.RELATED )
                .addComponent( this.lblStatus )
                .addContainerGap() )
        );
    }
}
